import request from "../../utils/request.js"
export default {
	state:{
		categoryList:[],
	},
	actions:{
		//获取分类数据
		async	getCategoryList({commit}){
			const result = await request('/categoryList')
			commit("CATEGORY_LIST",result.data.pageData[1].dataField.categoryList)
		}
	},
	mutations:{
		CATEGORY_LIST(state,categoryList){
			state.categoryList=categoryList
		}
	},
	getters:{
		imageItem(state){
			return state.categoryList[0]
		}
	},
}